package com.example.demo.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Hy on 2018/3/30.
 */
@MappedSuperclass
public class BaseEntity implements Serializable{
    /** 添加时间 */
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateAdd;

    /** 修改时间 */
    private Date dateUpd;
    public BaseEntity() {

    }

    public BaseEntity(Date dateAdd, Date dateUpd) {
        this.dateAdd = dateAdd;
        this.dateUpd = dateUpd;
    }

    public Date getDateAdd() {
        return dateAdd;
    }

    public void setDateAdd(Date dateAdd) {
        this.dateAdd = dateAdd;
    }

    @Temporal(TemporalType.TIME)
    public Date getDateUpd() {
        return dateUpd;
    }

    public void setDateUpd(Date dateUpd) {
        this.dateUpd = dateUpd;
    }

}
